<?php defined('SYSPATH') or die('No direct script access.');

class Controller_Base_Language extends Controller_Base_Frontend {

	public function action_changeLanguage()	{
		$redirect = '/';
		I18n::lang($_GET['lang']);
		Cookie::set('lang', I18n::lang());
		if(isset($_GET['redirect'])){
			$redirect = $_GET['redirect'];
		}
		Request::current()->redirect(I18n::lang()."/".$redirect);
	}
	
} // End Language